package com.sxjh.entity;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import java.time.LocalDate;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 合同管理
 * </p>
 *
 * @author zixin
 * @since 2021-07-28
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("ht_contract")
@ApiModel(value="Contract对象", description="合同管理")
public class Contract implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "唯一ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "合同号")
    @TableField("contract_number")
    private String contractNumber;

    /** 合同类别;0|自产自销,1|集团外采,2|集团外销,3|股份外采,4|股份外销 */
    @ApiModelProperty("合同类别;0|自产自销,1|集团外采,2|集团外销,3|股份外采,4|股份外销")
    @TableField("contract_category")
    private Integer contractCategory ;

    @ApiModelProperty(value = "合同种类;0|普通,1|子合同")
    @TableField("contract_kind")
    private Integer contractKind;

    @ApiModelProperty("扣水模式;0|百分比±,1|百分比,2|计价水±,3|加价水-,4|干基")
    @TableField("deduct_water_type")
    private Integer deductWaterType;

    @ApiModelProperty(value = "母合同ID")
    @TableField("mother_id")
    private Integer motherId;

    @ApiModelProperty(value = "买方公司id")
    @TableField("customer_user_id")
    private Integer customerUserId;
    @ApiModelProperty(value = "卖方公司ID")
//  @NotNull(message = "供应商ID不能为空")
    @TableField("seller_customer_user_id")
    private Integer sellerCustomerUserId;

    @ApiModelProperty(value = "产品类别ID")
    @TableField("material_id")
    private Integer materialId;

    @ApiModelProperty(value = "合同起始日期")
    @TableField("start_date")
    private LocalDate startDate;

    @ApiModelProperty(value = "合同终止日期")
    @TableField("expiry_date")
    private LocalDate expiryDate;

    @ApiModelProperty(value = "合同数量")
    @TableField("quantity")
    private BigDecimal quantity;

    @ApiModelProperty(value = "合同价格")
    @TableField("price")
    private BigDecimal price;

    @ApiModelProperty(value = "到站")
    @TableField("station")
    private String station;

    @ApiModelProperty(value = "运费单价")
    @TableField("freight")
    private BigDecimal freight;

    @ApiModelProperty(value = "加价")
    @TableField("markup")
    private BigDecimal markup;

    @ApiModelProperty(value = "增值税率")
    @TableField("appreciation_tax")
    private BigDecimal appreciationTax;

    @ApiModelProperty(value = "运费税率")
    @TableField("freight_tax")
    private BigDecimal freightTax;

    @ApiModelProperty(value = "签订部门")
    @TableField("department")
    private String department;

    @ApiModelProperty(value = "签订人")
    @TableField("signer")
    private String signer;

    @ApiModelProperty(value = "检化验权;0|出厂,1|用户,2|第三方,3|其他方式")
    @TableField("inspection")
    private Integer inspection;

    @ApiModelProperty(value = "合同类型;0|车板,1|一票包到,2|两票包到")
    @TableField("contract_type")
    private Integer contractType;

    @ApiModelProperty(value = "付款方式;0|预付,1|结算后付款")
    @TableField("payment_method")
    private Integer paymentMethod;

    @ApiModelProperty(value = "付款类别;0|现汇,1|承兑")
    @TableField("payment_type")
    private Integer paymentType;

    @ApiModelProperty(value = "补途;0|无补途,1|补途1‰,2|补途4%")
    @TableField("complementary_way")
    private Integer complementaryWay;

    @ApiModelProperty(value = "备注")
    @TableField("remark")
    private String remark;

    @ApiModelProperty(value = "附件")
    @TableField("attachment")
    private String attachment;
    @ApiModelProperty(value = "结算单据附件")
    @TableField("settlement_receipt_attachment")
    private String settlementReceiptAttachment;

    @ApiModelProperty(value = "水分%")
    @TableField("water")
    private BigDecimal water;

    @ApiModelProperty(value = "灰分%")
    @TableField("ash")
    private BigDecimal ash;

    @ApiModelProperty(value = "硫分%")
    @TableField("sulfur")
    private BigDecimal sulfur;

    @ApiModelProperty(value = "挥发分%")
    @TableField("volatilize")
    private BigDecimal volatilize;

    @ApiModelProperty(value = "M40%")
    @TableField("m40")
    private BigDecimal m40;

    @ApiModelProperty(value = "M10%")
    @TableField("m10")
    private BigDecimal m10;

    @ApiModelProperty(value = "CSR%")
    @TableField("csr")
    private BigDecimal csr;

    @ApiModelProperty(value = "CRI%")
    @TableField("cri")
    private BigDecimal cri;

    @ApiModelProperty(value = "焦沫含量%")
    @TableField("foam")
    private BigDecimal foam;

    @ApiModelProperty(value = "焦沫扣价刻度%")
    @TableField("foam_scale")
    private BigDecimal foamScale;

    @ApiModelProperty(value = "焦沫扣价/吨")
    @TableField("foam_discount")
    private BigDecimal foamDiscount;

    @ApiModelProperty(value = "灰分扣价刻度%")
    @TableField("ash_scale")
    private BigDecimal ashScale;

    @ApiModelProperty(value = "硫分扣价刻度%")
    @TableField("sulfur_scale")
    private BigDecimal sulfurScale;

    @ApiModelProperty(value = "挥发分扣价刻度%")
    @TableField("volatilize_scale")
    private BigDecimal volatilizeScale ;

    @ApiModelProperty(value = "M10扣价刻度%")
    @TableField("m10_scale")
    private BigDecimal m10Scale;

    @ApiModelProperty(value = "M40扣价刻度%")
    @TableField("m40_scale")
    private BigDecimal m40Scale;

    @ApiModelProperty(value = "CSR扣价刻度%")
    @TableField("csr_scale")
    private BigDecimal csrScale;

    @ApiModelProperty(value = "CRI扣价刻度%")
    @TableField("cri_scale")
    private BigDecimal criScale;

    @ApiModelProperty(value = "灰分扣价/吨")
    @TableField("ash_discount")
    private BigDecimal ashDiscount;

    @ApiModelProperty(value = "硫分扣价/吨")
    @TableField("sulfur_discount")
    private BigDecimal sulfurDiscount;

    @ApiModelProperty(value = "挥发分扣价/吨")
    @TableField("volatilize_discount")
    private BigDecimal volatilizeDiscount;

    @ApiModelProperty(value = "M10扣价/吨")
    @TableField("m10_discount")
    private BigDecimal m10Discount;

    @ApiModelProperty(value = "M40扣价/吨")
    @TableField("m40_discount")
    private BigDecimal m40Discount;

    @ApiModelProperty(value = "CSR扣价/吨")
    @TableField("csr_discount")
    private BigDecimal csrDiscount;

    @ApiModelProperty(value = "CRI扣价/吨")
    @TableField("cri_discount")
    private BigDecimal criDiscount;

    @ApiModelProperty(value = "乐观锁")
    @TableField("revision")
    private Integer revision;

    @ApiModelProperty(value = "创建人")
    @TableField("created_by")
    private Integer createdBy;

    @ApiModelProperty(value = "创建时间")
    @TableField(value = "created_at", fill = FieldFill.INSERT)
    private LocalDateTime createdAt;

    @ApiModelProperty(value = "更新人")
    @TableField("updated_by")
    private Integer updatedBy;

    @ApiModelProperty(value = "更新时间")
    @TableField(value = "updated_at", fill = FieldFill.UPDATE)
    private LocalDateTime updatedAt;

    @ApiModelProperty(value = "删除人")
    @TableField("deleted_by")
    private Integer deletedBy;

    @ApiModelProperty(value = "删除时间")
    @TableField("deleted_at")
    private LocalDateTime deletedAt;


}
